﻿<!--
(c) Copyright Fernando Cerqueira.
This source is subject to the Microsoft Public License (Ms-PL).
Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
All other rights reserved.
-->

<UserControl x:Class="WindowsPhoneCommands.EditorWmAppManifestControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:res="clr-namespace:WindowsPhoneCommands"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="620">
    <Grid Margin="10">
    	<Grid.RowDefinitions>
    		<RowDefinition Height="Auto"/>
    		<RowDefinition/>
    	</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
            <Button Content="{Binding Source={x:Static res:Resources.XSaveManifest}}" Margin="10,0,0,0" Padding="3" d:LayoutOverrides="Height" Name="BntSave" Click="BntSaveClick" />
            <Button Content="{Binding Source={x:Static res:Resources.XEditXml}}" Padding="3" Margin="10,0,0,0" Name="BntShowXml" Click="BntShowXmlClick" />
        </StackPanel>
		<ScrollViewer Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" UseLayoutRounding="True" Margin="0">
			<Grid x:Name="GrdMain">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="250"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<GroupBox Grid.ColumnSpan="2" Padding="5,0,5,5" Margin="0,0,0,5">
                    <GroupBox.Header>
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XMnfApplication}}" FontWeight="Bold"/>
                    </GroupBox.Header>
                    <Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="250"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
                        <TextBlock TextWrapping="Wrap" Text="{Binding Source={x:Static res:Resources.XMnfTitle}}" Margin="0,10,0,0" FontWeight="Normal"/>
						<TextBox TextWrapping="Wrap" Grid.Row="1" Width="240" Margin="0,1,0,0" HorizontalAlignment="Left" Name="TxtTitle" LostFocus="SupressSpaceLostFocus" MaxLength="59" />
                        <TextBlock TextWrapping="Wrap" Text="{Binding Source={x:Static res:Resources.XMnfAuthor}}" Grid.Column="1" FontWeight="Normal" Margin="0,10,0,0"/>
						<TextBox TextWrapping="Wrap" HorizontalAlignment="Left" Grid.Column="1" Width="240" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="1" Name="TxtAuthor" LostFocus="SupressSpaceLostFocus" MaxLength="64" />
                        <TextBlock TextWrapping="Wrap" Text="{Binding Source={x:Static res:Resources.XMnfTokenid}}" Grid.Row="2" Margin="0,10,0,0" FontWeight="Normal"/>
                        <TextBox TextWrapping="Wrap" HorizontalAlignment="Left" Grid.Row="3" Width="240" Height="23" VerticalAlignment="Bottom" Name="TxtToken" LostFocus="SupressSpaceLostFocus" MaxLength="64" />
                        <TextBlock TextWrapping="Wrap" Text="{Binding Source={x:Static res:Resources.XMnfPublisher}}" Grid.Row="2" Grid.Column="1" FontWeight="Normal" Margin="0,10,0,0"/>
						<TextBox TextWrapping="Wrap" HorizontalAlignment="Left" Grid.Row="3" Width="240" Grid.Column="1" Height="23" VerticalAlignment="Bottom" Name="TxtPublisher" LostFocus="SupressSpaceLostFocus" MaxLength="54" />
                        <TextBlock TextWrapping="Wrap" Grid.Row="4" FontWeight="Normal" Margin="0,10,0,0" Text="{Binding Source={x:Static res:Resources.XMnfDescription}}"/>
						<TextBox TextWrapping="Wrap" Grid.Row="5" Width="240" MinLines="3" HorizontalAlignment="Left" Name="TxtDesc" LostFocus="SupressSpaceLostFocus" MaxLength="128" />
                        <TextBlock TextWrapping="Wrap" Grid.Row="4" Grid.Column="1" Text="{Binding Source={x:Static res:Resources.XMnfVersion}}" FontWeight="Normal" Margin="0,10,0,0"/>
						<StackPanel d:LayoutOverrides="Width" Grid.Row="5" Grid.Column="1" VerticalAlignment="Bottom">
							<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBox TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="30" Name="TxtVerMax" MaxLength="3" PreviewTextInput="NumericTextInput" LostFocus="SupressSpaceLostFocus" />
								<TextBlock TextWrapping="Wrap" Text="." FontWeight="Bold" FontSize="24" VerticalAlignment="Top" Margin="2,-7,2,0"/>
                                <TextBox TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="30" Name="TxtVerMin" MaxLength="3" PreviewTextInput="NumericTextInput" LostFocus="SupressSpaceLostFocus" />
								<TextBlock TextWrapping="Wrap" Text="." FontWeight="Bold" FontSize="24" VerticalAlignment="Top" Margin="2,-7,2,0"/>
                                <TextBox TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="30" Name="TxtVerRev" MaxLength="3" PreviewTextInput="NumericTextInput" LostFocus="SupressSpaceLostFocus" />
								<TextBlock TextWrapping="Wrap" Text="." FontWeight="Bold" FontSize="24" VerticalAlignment="Top" Margin="2,-7,2,0"/>
                                <TextBox TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="45" Name="TxtVerBld" MaxLength="5" PreviewTextInput="NumericTextInput" LostFocus="SupressSpaceLostFocus" />
							</StackPanel>
                            <StackPanel Orientation="Horizontal" Name="LnkCopyAssembly" MouseEnter="LnkCopyAssemblyMouseEnter" MouseLeave="LnkCopyAssemblyMouseLeave" MouseLeftButtonUp="LnkCopyAssemblyMouseLeftButtonUp">
                                <TextBlock Name="LblCopyAssembly" Text="{Binding Source={x:Static res:Resources.XMnfCopyAssembly}}" FontWeight="Bold" />
                                <TextBlock Name="LblProjectAssembly"  Text="()" FontWeight="Bold" Margin="3,0,0,0" />
                            </StackPanel>
						</StackPanel>
                        <TextBlock TextWrapping="Wrap" Grid.Row="6" Text="{Binding Source={x:Static res:Resources.XMnfIcon}}" FontWeight="Normal" Margin="0,10,0,0"/>
						<ComboBox Grid.Row="7" Width="240" Height="23" HorizontalAlignment="Left" Name="CboIcon" LostFocus="CheckCbo" />
                        <TextBlock TextWrapping="Wrap" Grid.Row="6" Grid.Column="1" Text="{Binding Source={x:Static res:Resources.XMnfStartPage}}" FontWeight="Normal" Margin="0,10,0,0"/>
						<ComboBox Grid.Row="7" Width="240"  HorizontalAlignment="Left" Grid.Column="1" Height="23" Name="CboStartPage" LostFocus="CheckCbo" />
					</Grid>
				</GroupBox>
				<GroupBox Grid.Row="1" BorderThickness="1" Grid.ColumnSpan="2" Padding="5,0" Margin="0">
                    <GroupBox.Header>
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XMnfTile}}" FontWeight="Bold"/>
                    </GroupBox.Header>
                    <Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="250"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
                        <TextBlock TextWrapping="Wrap" Text="{Binding Source={x:Static res:Resources.XMnfTitleCount}}" FontWeight="Normal"/>
						<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Grid.Row="1">
							<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Width="190" VerticalContentAlignment="Stretch" Name="TxtTile" LostFocus="SupressSpaceLostFocus" MaxLength="64" />
                            <TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Width="40" VerticalContentAlignment="Stretch" Margin="10,0,0,0" Name="TxtTileCount" MaxLength="2" PreviewTextInput="NumericTextInput" LostFocus="SupressSpaceLostFocus" />
						</StackPanel>
                        <TextBlock TextWrapping="Wrap" Grid.Column="1" Text="{Binding Source={x:Static res:Resources.XMnfBackground}}" FontWeight="Normal"/>
						<ComboBox  HorizontalAlignment="Left" Grid.Column="1" VerticalAlignment="Bottom" Width="240" Grid.Row="1" Name="CboTileBg" LostFocus="CheckCbo" />
					</Grid>
				</GroupBox>
				<GroupBox Grid.Row="2" Grid.ColumnSpan="2" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="0,10,0,0" Padding="5,0">
					<GroupBox.Header>
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XMnfCapabilities}}" FontWeight="Bold"/>
					</GroupBox.Header>
					<Grid Margin="0,0,0,1">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<StackPanel Orientation="Vertical">
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapAppoint}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkApp" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapCam}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkCam" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapContat}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkCont" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapDialer}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkDiler" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapGamer}}" d:LayoutOverrides="Width" Margin="0,5,0,0" Name="ChkGame" />
						</StackPanel>
						<StackPanel Orientation="Vertical" Grid.Column="1">
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapIdDev}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkIdDev" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapIdUse}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkIdUser" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapLoc}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkLoc" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapMedLib}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkMedLib" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapMic}}" d:LayoutOverrides="Width" Margin="0,5,0,0" Name="ChkMic" />
						</StackPanel>
						<StackPanel Orientation="Vertical" Grid.Column="2">
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapNet}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChklNet" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapPhush}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkPush" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapSensor}}" d:LayoutOverrides="Width" Margin="0,5" Name="ChkSen" />
                            <CheckBox Content="{Binding Source={x:Static res:Resources.XCapWeb}}" d:LayoutOverrides="Width" Margin="0,5,0,0" Name="ChkWeb" />
						</StackPanel>
					</Grid>
				</GroupBox>
				<GroupBox Margin="0,10,0,0" d:LayoutOverrides="Height" Grid.Row="3" Grid.ColumnSpan="2" Padding="5,0">
                    <GroupBox.Header>
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XMnfOther}}" FontWeight="Bold"/>
                    </GroupBox.Header>
                    <Grid >
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
                        <CheckBox Content="{Binding Source={x:Static res:Resources.XMnfIsBeta}}" VerticalAlignment="Bottom" Name="ChkBeta" />
                        <CheckBox Content="{Binding Source={x:Static res:Resources.XMnfSingle}}" Grid.Column="1" Name="ChkSingle" />
                        <CheckBox Content="{Binding Source={x:Static res:Resources.XMnfHasSett}}" Grid.Column="2" Name="ChkSett" />
					</Grid>
				</GroupBox>
			</Grid>
		</ScrollViewer>
	</Grid>
</UserControl>
